package com.olddriver.crm.service.impl;

import com.olddriver.crm.domain.Permission;
import com.olddriver.crm.mapper.PermissionMapper;
import com.olddriver.crm.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements IPermissionService{

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public int insert(Permission permission){
        return permissionMapper.insert(permission);
    }

    @Override
    public List<Permission> listAll() {
        return permissionMapper.find();
    }

    @Override
    public List<String> getResourses() {
        return permissionMapper.findResourses();
    }


}
